package com.zl.controller;

import com.zl.pojo.User;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zl
 * @date 2023/3/7
 * @apiNote
 */
@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String hello() {
        return "hello";
    }

    @PostMapping("/user")
    public User user() {
        return new User();
    }

    @ApiOperation("Hello控制类")
    @GetMapping("/testOperation")
    public String testOperation(@ApiParam("用户名") String username){
        return "hello"+username;
    }
}
